package com.hangzhou.xyj.net.request;

import com.hangzhou.xyj.net.request.base.BaseRequest;
import com.hangzhou.xyj.utils.PublicUtil;
import com.hangzhou.xyj.utils.constants.API;

/**
 * Created by yaohuix on 2016/2/22  11:53
 * <p/>
 * 说明：更新密码（手机注册用户） 请求
 */
public class UpdatePasswordReq extends BaseRequest {

    public UpdatePasswordReq(String userId, String oldPassword, String newPassword) {
        setUserId(userId);
        setOldPassword(oldPassword);
        setNewPassword(newPassword);
    }

    public void setUserId(String userId) {
        add("id", PublicUtil.string2Long(userId));
    }

    public void setOldPassword(String oldPassword) {
        add("oldPassword", oldPassword);
    }

    public void setNewPassword(String newPassword) {
        add("newPassword", newPassword);
    }

    @Override
    public String getUrl() {
        return API.UPDATE_PASSWORD;
    }
}
